﻿/**********************************************************************
 * @file   OperGeometryBool.h
 * @brief  Geometry下Bool 面操作器
 * @author guqingtao (15598887859@163.com)
 * @date   2025-02-24
 *********************************************************************/

#ifndef __OPERATORS_GEOMETRY_BOOL_____
#define __OPERATORS_GEOMETRY_BOOL_____

#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"

namespace ModelOper
{
    class  OperGeometryBool :public Core::FITKActionOperator
    {
        Q_OBJECT;
    public:
        /**
         * @brief    bool操作器
         * @return   void
         * @author   guqingtao (15598887859@163.com)
         * @date     2025-02-24
         */
        explicit OperGeometryBool() = default;
        virtual ~OperGeometryBool() = default;

        /**
         * @brief 执行界面操作
         * @return true     执行成功
         * @return false     执行失败
         * @author guqingtao (15598887859@163.com)
         * @date 2025-02-24
         */
        virtual bool execGUI() override;
        /**
         * @brief 执行读入操作
         * @return true     执行成功
         * @return false     执行失败
         * @author guqingtao (15598887859@163.com)
         * @date 2025-02-24
         */
        virtual bool execProfession() override;

    private:
        bool createBoolUniteOper();
        bool createBoolIntersectOper();
        bool createBoolSubtractOper();
    };

    // 按钮注册相关操作
    Register2FITKOperatorRepo(actionGeometricOperationsUnite, OperGeometryBool);
    Register2FITKOperatorRepo(actionGeometricOperationsIntersect, OperGeometryBool);
    Register2FITKOperatorRepo(actionGeometricOperationsSubtract, OperGeometryBool);
}
#endif